package test;

/**
 * Created by Caesar on 2016/1/27.
 */
public class Block {

    int width;
    int length;
    int height;



    int Volume;
    int SurfaceArea;

    public Block(int args[]) {
        this.width = args[0];
        this.length = args[1];
        this.height = args[2];
        this.Volume = width * length * height;
        this.SurfaceArea = 2 * (width * length) + 2 * (length * height) + 2 * (width * height);
    }

    public int getHeight() {
        return height;
    }

    public int getWidth() {
        return width;
    }

    public int getLength() {
        return length;
    }

    public int getVolume() {
        return Volume;
    }

    public int getSurfaceArea() {
        return SurfaceArea;
    }

    public static void main(String[] args) {
        Block b = new Block(new int[]{2,2,2});
        System.out.println(b.getHeight());
        System.out.println(b.getLength());
        System.out.println(b.getWidth());
        System.out.println(b.getVolume());
        System.out.println(b.getSurfaceArea());

    }
}
